package base.java8;

import java.util.Base64;

/**
 * Base64
 *
 * @author 王霄
 * @date 2021/9/16 21:39
 */
public class Base64Demo {
    public static void main(String[] args) {
        byte[] encode = Base64.getEncoder().encode("你好".getBytes());
        System.out.println(new String(Base64.getDecoder().decode(encode)));
    }
}
